<html><head><title>Sort_(String).pb</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<pre><font face="Courier New, Courier, mono"size="2"><font color="#006666">;
</font><font color="#006666">; ------------------------------------------------------------
</font><font color="#006666">;
</font><font color="#006666">;   PureBasic - Sort (String) example file
</font><font color="#006666">;
</font><font color="#006666">;    (c) Fantaisie Software
</font><font color="#006666">;
</font><font color="#006666">; ------------------------------------------------------------
</font><font color="#006666">;
</font>
<font color="#006666">; Don't change the number of elements without add them in the data below !
</font><font color="#006666">;
</font><font color="#924B72">#NbElements</font> = 8

<b><font color="#006666">Dim</font></b> <b><font color="#006666">Array</font></b>.s(<font color="#924B72">#NbElements</font>)

<b><font color="#006666">For</font></b> k=0 <b><font color="#006666">To</font></b> <font color="#924B72">#NbElements</font>
  <b><font color="#006666">Read</font></b>.s <b><font color="#006666">Array</font></b>(k)
<b><font color="#006666">Next</font></b>

<b><font color="#006666">For</font></b> k=0 <b><font color="#006666">To</font></b> <font color="#924B72">#NbElements</font>
  <b><font color="#006666">Debug</font></b> <b><font color="#006666">Array</font></b>(k)
<b><font color="#006666">Next</font></b>

<font color="#006666">SortArray</font>(<b><font color="#006666">Array</font></b>(), <font color="#924B72">#PB_Sort_Ascending</font> | <font color="#924B72">#PB_Sort_NoCase</font>)

<b><font color="#006666">Debug</font></b> "---------------------"

<b><font color="#006666">For</font></b> k=0 <b><font color="#006666">To</font></b> <font color="#924B72">#NbElements</font>
  <b><font color="#006666">Debug</font></b> <b><font color="#006666">Array</font></b>(k)
<b><font color="#006666">Next</font></b>

<font color="#006666">MessageRequester</font>("Information", "Sort finished !", 0)

<b><font color="#006666">End</font></b>


<b><font color="#006666">DataSection</font></b>
  <b><font color="#006666">Data</font></b>.s "Hello", "This", "is", "a", "Nice", "test", "Isn't", "it ?", "Haha !" 
<b><font color="#006666">EndDataSection</font></b>
</font></pre>
</body></html>
